$htmldir: ltr !default;

// Variables
@import "variables";

// Bootstrap
@import "custom_bootstrap";

@import "~hint.css/hint.min";

@import "~tachyons/css/tachyons.min";

// For the datatables
@import "_datatable.min";

// Icon fonts
@import "~font-awesome/scss/font-awesome";

// Tooltip
@import "~vue-directive-tooltip/src/css/index.scss";

// Radio button
@import "~pretty-checkbox/src/pretty-checkbox";

// datepicker
@import "~@hokify/vuejs-datepicker/dist/vuejs-datepicker.css";

// Tables
@import "~vue-good-table/dist/vue-good-table.css";

@import "buttons";
@import "header";
@import "people";
@import "journal";
@import "marketing";
@import "settings";
@import "modal";
@import "changelog";

// Custom colors

// Extending Tachyions
$bg-hover-monica: #f1f5fd;

.bg-gray-monica {
  background-color: #f2f4f8;
}

.bg-blue-monica {
  background-color: #325776;
}

.b--gray-monica {
  border-color: #dde2e9;
}

.bg-hover-monica {
  &:hover {
    background-color: $bg-hover-monica;
  }
}

.box-shadow {
  background: #fff;
  border: 1px solid #e7e7e7;
  box-shadow: 1px -1px 4px rgba(122, 122, 122, 0.25);
  border-radius: 11px;
}

.w-5 {
  width: 5%;
}

.w-95 {
  width: 95%;
}

.w-12 {
  width: calc(100% / 12);
}

.form-error-message {
  border-top: 1px solid #ed6246;
  background-color: #fbeae5;
  box-shadow: inset 0 3px 0 0 #ed6347, inset 0 0 0 0 transparent, 0 0 0 1px rgba(63,63,68,.05), 0 1px 3px 0 rgba(63,63,68,.15);
}

.form-information-message {
  border-top: 1px solid #46C1BF;
  background-color: #E0F5F5;
  box-shadow: inset 0 3px 0 0 #47c1bf, inset 0 0 0 0 transparent, 0 0 0 1px rgba(63,63,68,.05), 0 1px 3px 0 rgba(63,63,68,.15);

  svg {
    width: 20px;
    fill: #00848e;
    color: #fff;
  }
}

// Utilities
.border-bottom {
  border-bottom: 1px solid $border-color;
}

.border-top {
  border-top: 1px solid $border-color;
}

.border-right {
  border-right: 1px solid $border-color;
}

.border-left {
  border-left: 1px solid $border-color;
}

.padding-left-none {
  padding-left: 0;
}

.boxed {
  background: #fff;
  border: 1px solid $border-color;
  border-radius: 3px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .05);
}

.box-padding {
  padding: 15px;
}

.badge {
  display: inline-block;
  padding: 4px 5px;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: .25rem;
}

.badge-success {
  background-color: #5cb85c;
}

.badge-danger {
  background-color: #d9534f;
}

kbd {
  padding:0.1em 0.6em;
  border:1px solid #ccc;
  font-size:11px;
  font-family:Arial,Helvetica,sans-serif;
  background-color:#f7f7f7;
  color:#333;
  box-shadow:0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset;
  border-radius:3px;
  display:inline-block;
  margin:0 0.1em;
  text-shadow:0 1px 0 #fff;
  line-height:1.4;
  white-space:nowrap;
}

.life-event {
  .life-event-add-row {
    &:hover {
      background-color: $bg-hover-monica;
    }
  }

  .life-event-add-arrow {
    right: 10px;
    top: 12px;
  }

  .life-event-add-icon {
    background-color: #d7e3ec;
    border-radius: 50%;
    padding: 20px;
    width: 65px;

    img {
      width: 70px;
    }
  }
}

.chart-activities {
  display: table;
  table-layout: fixed;
  width: 100%;
  max-width: 700px;
  height: 200px;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 2%, transparent 2%);
  background-size: 100% 50px;
  background-position: left top;

  li {
    position: relative;
    display: table-cell;
    vertical-align: bottom;
    height: 200px;
  }

  span {
    margin: 0 1em;
    display: block;
    background: rgba(#d1ecfa, .75);
    animation: draw 1s ease-in-out;

    &:before{
      position: absolute;
      left: 0;
      right: 0;
      top: 100%;
      padding: 5px 1em 0;
      display: block;
      text-align: center;
      content: attr(title);
      word-wrap: break-word;
    }
  }
}

@keyframes draw{
  0%{height:0;}
}

// Generic styles
body {
  color: #4a4a4a;
}

a {
  color: #0366d6;
  padding: 1px;
  text-decoration: underline;

  &:hover {
    background-color: #0366d6;
    color: #fff;
    text-decoration: none;
  }

  &.action-link {
    color: #999;
    font-size: 11px;
    text-decoration: underline;
    margin-right: 5px;
    @if $htmldir == rtl {
      float: right;
    }
  }
}

a[hreflang]:after {
  content: " (" attr(hreflang) ")";
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;

  &.horizontal {
    li {
      display: inline;
    }
  }
}

.markdown {
  ul {
    list-style-type: disc;
    margin-left: 15px;
    padding-left: 0;
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

.hidden {
  display: none;
}

input:disabled {
  background-color: #999;
}

.pagination-box {
  margin-top: 30px;
  text-align: center;
}

.alert-success {
  margin: 20px 0;
}

.central-form {
  margin-top: 40px;

  h2 {
    font-weight: 400;
    margin-bottom: 20px;
    text-align: center;
  }

  .offset-sm-3-right {
    margin-right: 25%;
  }

  .form-check-inline {
    margin-right: 10px;
  }

  .form-group > label:not(:first-child) {
    margin-top: 10px;
  }

  input[type="radio"] {
    margin-right: 5px;
  }

  .dates {
    .form-inline {
      display: inline;

      input[type="number"] {
        margin: 0 10px;
        width: 52px;
      }

      input[type="date"] {
        margin-left: 20px;
        margin-top: 10px;
      }
    }
  }

  .form-group:not(:last-child) {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
  }

  .nav {
    margin-top: 40px;

    .nav-link {
      text-decoration: none;
    }
  }

  .tab-content {
    border-right: 1px solid #ddd;
    border-left: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 15px;
  }
}

.profile-page-avatar {
  left: 48%;
  top: -60px;

  img, div {
    border-radius: 50%;
  }

  @media (max-width: 480px) {
    left: 40%;
  }
}

.avatar-photo {
  img {
    border-radius: 3px;
  }
}

.breadcrumb {
  background-color: #f9f9fb;

  ul {
    font-size: 12px;
    padding: 30px 0 24px;

    li:not(:last-child):after {
      content: '>';
      @if $htmldir == ltr {
        margin-left: 5px;
        margin-right: 1px;
      } @else {
        margin-right: 5px;
        margin-left: 1px;
      }
    }
  }
}

.table {
  border-collapse: collapse;
  display: table;
  width: 100%;

  .table-row {
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    border-top: 1px solid #ddd;
    display: table-row;

    &:first-child {
      .table-cell:first-child {
        border-top-left-radius: 3px;
      }

      .table-cell:last-child {
        border-top-right-radius: 3px;
      }
    }

    &:last-child {
      border-bottom: 1px solid #ddd;
    }

    &:hover {
      background-color: #f6f8fa;
    }
  }

  .table-cell {
    display: table-cell;
    padding: 8px 10px;
  }
}

.profile-selected {
  .profile-selected-left {
    border-left: 1px solid #dde2e9;
    border-top: 1px solid #dde2e9;
    border-bottom: 1px solid #dde2e9;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
  }

  .profile-selected-right {
    border-right: 1px solid #dde2e9;
    border-top: 1px solid #dde2e9;
    border-bottom: 1px solid #dde2e9;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
  }
}

.full-page-modal {
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 2px 0px 6px rgba(0, 0, 0, 0.25);
  border-radius: 12px;

  .full-page-modal-year-selector {
    &:hover, &.selected {
      background-color: #f7fbfc;
    }
  }
}

.full-page-modal-header {
  background: #fff;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.column-list {
  column-count: 3;
  column-gap: 20px;
}

.dt-row.hover {
  &:hover {
    background-color: #f6fbff;
  }
}

.profile-edit-contact-button {
  right: 20px;
  top: 20px;
}

// datasets
table.vgt-table {
  font-size: 14px;

  td.vgt-table-date {
    padding-left: 10px;
    vertical-align: middle;
    width: 110px;
  }

  td.vgt-table-action .action-btn {
    border: 1px solid transparent;
    display: inline;
    padding: 0px 8px 4px;

    &:hover {
      box-shadow: 1px 0px 1px rgba(43, 45, 80, 0.16), -1px 1px 1px rgba(43, 45, 80, 0.16), 0px 1px 4px rgba(43, 45, 80, 0.18);
      border-radius: 3px;
    }
  }

  th {
    padding-left: 10px;
    font-size: 13px;
  }

  td {
    padding-left: 10px;
    font-size: 14px;
  }
}

.vgt-wrap__footer {
  padding: 3px 10px!important;
  background: linear-gradient(#ffffff,#fbfbfb)!important;
}

footer {
  .badge-success {
    font-size: 12px;
    font-weight: 400;
  }

  .show-version {
    text-align: left;

    h2 {
      font-size: 16px;
    }

    .note {
      margin-bottom: 20px;

      ul {
        list-style-type: disc;
      }

      li {
        display: block;
        font-size: 15px;
        text-align: left;
      }
    }
  }
}

@media (max-width: 480px) {
  .sidebar-box {
    border: 1px solid $border-color;
    border-radius: 3px;

    .sidebar-heading {
      background-color: #fafafa;
      margin-top: 0;
      padding: 5px;
    }

    .sidebar-blank {
      background-color: #fff;
      border: 0;
    }

    li {
      padding: 5px;
    }
  }

  .column-list {
    column-count: 1;
    column-gap: 20px;
  }

  .chart-activities {
    span{
      margin: 0 4px;
    }
  }
}

// Fix svg alignment
svg {
  vertical-align: baseline !important;
}
